<%@LANGUAGE="VBSCRIPT"%> <% function getColorByDataAssignments(tmprs) if (tmprs.eof) then getColorByDataAssignments="0" else getColorByDataAssignments = "B0BECC" end if end function dim Conn, strSql, rs, strMessage set Conn = server.createobject("ADODB.Connection") Conn.open strConn %>
 
<% if request("mode") <> "detail" then %>
News Archive


<% strSql = "select News_ID_PK, theDate, Headline from tblNews order by theDate desc" heading = array("", "") if request("page") <> "" then cpage = request("page") else cpage = 1 'default end if ListTable Heading, strSql, Conn, 10, cpage, 0, "news.asp", "news.asp?mode=detail", 2, 0 response.write "
" end if %>
  <% if request("mode") = "detail" and isnumeric(request("ID")) then strSql = "select * from tblNews where News_ID_PK = " & request("ID") set rs = server.createobject("ADODB.Recordset") rs.open strSql, Conn if not rs.eof then %>
<%= rs("Headline")%>
 
<%= AddBrToCrLf(rs("theText"))%>
<% end if rs.close %>

Back
<% end if %>
<% ' upcoming events set rs2 = server.createobject("adodb.recordset") strSql = "select top 4 tblEvent.*, tblIcon.ImgFile FROM tblEvent LEFT JOIN tblIcon ON tblEvent.Icon_ID_FK = tblIcon.Icon_ID_PK where tblEvent.theDate >=date() order by tblEvent.theDate" rs2.open strSql, Conn %>
 


Upcoming Events

<% If Not rs2.EOF Then %> <% End If If Not rs2.EOF Then %> <% End If If Not rs2.EOF Then %> <% End If If Not rs2.EOF Then %> <% End If rs2.close : set rs2=nothing %>
" width="89" height="52"> <% 'If Len(rs2("theText")) > 80 Then dot = ".." Else dot = "" response.write formatdatetime(rs2("theDate"), vbShortDate) response.write "
" response.write rs2("title") rs2.MoveNext %>
" width="89" height="52">   <% response.write formatdatetime(rs2("theDate"), vbShortDate) response.write "
" response.write rs2("title") rs2.MoveNext %>
" width="89" height="52">   <% response.write formatdatetime(rs2("theDate"), vbShortDate) response.write "
" response.write rs2("title") rs2.MoveNext %>
" width="89" height="52">   <% response.write formatdatetime(rs2("theDate"), vbShortDate) response.write "
" response.write rs2("title") rs2.MoveNext %>
 
 
<% set rs = nothing Conn.close : set Conn = nothing Function AddBrToCrLf(strInput) AddBrToCrLf = Replace(strInput, vbCrLf, "
" & vbCrLf) End Function %>
 
6355 Corte Del Abeto C-100 Carlsbad, CA 92009 Phone: 760.603.9777 © 2005, All rights reserved. Calvary Chapel Carlsbad